<template>
  <div class="app-container home">
    <el-row :gutter="20">
      <el-col :sm="24" :lg="12" style="padding-left: 20px">
        <h2>蓝羽后台管理系统</h2>
        <p>
          个人开发的后台管理系统，基本包含了后台系统所需的基本功能，如用户、组织架构、权限、菜单等，集成了quartz、redis、elasticsearch等框架，为后期的深度开发提供支持
        </p>
        <p>
          <b>当前版本:</b> <span>v{{ version }}</span>
        </p>
        <p v-permission="['code:code']">
          <el-tag type="danger">&yen;免费开源</el-tag>
        </p>
        <p>
          <el-button
            type="primary"
            size="mini"
            icon="el-icon-cloudy"
            plain
            @click="goTarget('http://www.zhoulang.site')"
            >访问码云</el-button
          >
          <el-button
            size="mini"
            icon="el-icon-s-home"
            plain
            @click="goTarget('http://www.zhoulang.site')"
            >访问主页</el-button
          >
        </p>
      </el-col>

      <el-col :sm="24" :lg="12" style="padding-left: 50px">
        <el-row>
          <el-col :span="12">
            <h2>技术选型</h2>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="6">
            <h4>后端技术</h4>
            <ul>
              <li>SpringBoot</li>
              <li>MyBatisPlus</li>
              <li>JWT</li>
              <li>Redis</li>
              <li>Quartz</li>
              <li>...</li>
            </ul>
          </el-col>
          <el-col :span="6">
            <h4>前端技术</h4>
            <ul>
              <li>Vue</li>
              <li>Vuex</li>
              <li>Element-ui</li>
              <li>Axios</li>
              <li>Sass</li>
              <li>Quill</li>
              <li>...</li>
            </ul>
          </el-col>
        </el-row>
      </el-col>
    </el-row>
    <el-divider />
    <el-row :gutter="20">
      <el-col :xs="24" :sm="24" :md="12" :lg="8">
        <el-card class="update-log">
          <div slot="header" class="clearfix">
            <span>联系信息</span>
          </div>
          <div class="body">
            <p>
              <i class="el-icon-s-promotion"></i> 官网：<el-link
                href="http://www.zhoulang.site"
                target="_blank"
                >http://www.zhoulang.site</el-link
              >
            </p>
            <p>
              <i class="el-icon-user-solid"></i> QQ：2250884056
            </p>
            <p>
              <i class="el-icon-chat-dot-round"></i> 微信：<a
                href="javascript:;"
                >zhl--100</a
              >
            </p>
            <p>
              <i class="el-icon-money"></i> 支付宝：<a
                href="javascript:;"
                class="支付宝信息"
                >残红一点</a
              >
            </p>
          </div>
        </el-card>
      </el-col>
      <el-col :xs="24" :sm="24" :md="12" :lg="8">
        <el-card class="update-log">
          <div slot="header" class="clearfix">
            <span>更新日志</span>
          </div>
          <el-collapse accordion>
            <el-collapse-item>
              <span slot="title" class="inline-block w100">v2.0.5 - 2023-05-21
                <a v-permission="['code:code']" class="fr underline main-color" @click="downloadFile('2.0.5')">下载</a>
              </span>
              <ol>
                <li>增加数据源配置</li>
                <li>增加数据源权限配置</li>
                <li>增加访问日志统计</li>
              </ol>
            </el-collapse-item>
            <el-collapse-item>
              <span slot="title" class="inline-block w100">v2.0.4 - 2023-04-26
                <a v-permission="['code:code']" class="fr underline main-color" @click="downloadFile('2.0.4')">下载</a>
              </span>
              <ol>
                <li>增加异常访问日志记录</li>
                <li>增加考试管理</li>
                <li>考试流程发布</li>
              </ol>
            </el-collapse-item>
            <el-collapse-item>
              <span slot="title" class="inline-block w100">v2.0.2 - 2023-04-24
                <a v-permission="['code:code']" class="fr underline main-color" @click="downloadFile('2.0.2')">下载</a>
              </span>
              <ol>
                <li>所有表头增加后台排序功能</li>
                <li>增加组卷功能</li>
                <li>修复试卷打印pdf文字重叠问题</li>
                <li>选择题选项支持打乱</li>
                <li>修改已知bug</li>
              </ol>
            </el-collapse-item>
            <el-collapse-item>
              <span slot="title" class="inline-block w100">v2.0.0 - 2023-03-31
                <a v-permission="['code:code']" class="fr underline main-color" @click="downloadFile('2.0.0')">下载</a>
              </span>
              <ol>
                <li>activiti设计器使用bpmnjs</li>
                <li>增加系统默认的流程任务处理页面</li>
                <li>菜单权限页面勾选父节点时禁用的子节点状态不变</li>
                <li>页面路由优化</li>
                <li>增加题库查询</li>
              </ol>
            </el-collapse-item>
            <el-collapse-item>
              <span slot="title" class="inline-block w100">v1.0.4 - 2023-03-22
                <a v-permission="['code:code']" class="fr underline main-color" @click="downloadFile('1.0.4')">下载</a>
              </span>
              <ol>
                <li>增加流程定义</li>
                <li>增加系统流程管理页面</li>
                <li>增加系统待办页面</li>
                <li>增加请假单和流程审批功能</li>
                <li>菜单支持二级目录</li>
                <li>菜单权限支持@PathVariable的动态路径</li>
              </ol>
            </el-collapse-item>
            <el-collapse-item>
              <span slot="title" class="inline-block w100">v1.0.3 - 2023-03-14
                <a v-permission="['code:code']" class="fr underline main-color" @click="downloadFile('1.0.3')">下载</a>
              </span>
              <ol>
                <li>引入activiti</li>
                <li>流程模型管理</li>
                <li>其他细节优化</li>
              </ol>
            </el-collapse-item>
            <el-collapse-item title="v1.0.2 - 2023-03-10">
              <ol>
                <li>菜单权限界面采用平铺布局</li>
                <li>增加消息发送功能</li>
              </ol>
            </el-collapse-item>
            <el-collapse-item title="v1.0.1 - 2023-03-09">
              <ol>
                <li>新增系统附件管理</li>
                <li>其他细节优化</li>
              </ol>
            </el-collapse-item>
            <el-collapse-item title="v1.0.0 - 2023-03-08">
              <ol>
                <li>系统正式发布</li>
              </ol>
            </el-collapse-item>
          </el-collapse>
        </el-card>
      </el-col>
      
    </el-row>
  </div>
</template>

<script>
import { getVersion } from '@/api/sys'

export default {
  name: "Index",
  data() {
    return {
      // 版本号
      version: "2.0.2",
      basePath: process.env.VUE_APP_BASE_API
    };
  },
  mounted() {
    this.getSystemVersion()
  },
  methods: {
    downloadFile(version){
      this.download('/sys/attach/downloadVersion',{version:version})
    },
    getSystemVersion(){
      getVersion().then((d)=>{
        this.version = d;
      })

    },
    goTarget(href) {
      window.open(href, "_blank");
    }
  }
};
</script>

<style scoped lang="scss">
.home {
  blockquote {
    padding: 10px 20px;
    margin: 0 0 20px;
    font-size: 17.5px;
    border-left: 5px solid #eee;
  }
  hr {
    margin-top: 20px;
    margin-bottom: 20px;
    border: 0;
    border-top: 1px solid #eee;
  }
  .col-item {
    margin-bottom: 20px;
  }

  ul {
    padding: 0;
    margin: 0;
  }

  font-family: "open sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 13px;
  color: #676a6c;
  overflow-x: hidden;

  ul {
    list-style-type: none;
  }

  h4 {
    margin-top: 0px;
  }

  h2 {
    margin-top: 10px;
    font-size: 26px;
    font-weight: 100;
  }

  p {
    margin-top: 10px;

    b {
      font-weight: 700;
    }
  }

  .update-log {
    ol {
      display: block;
      list-style-type: decimal;
      margin-block-start: 1em;
      margin-block-end: 1em;
      margin-inline-start: 0;
      margin-inline-end: 0;
      padding-inline-start: 40px;
    }
  }
}
</style>

